#pragma once
#include <string>
#include <cstddef> 
#include <odb/core.hxx>

// 聊天会话成员表映射对象

namespace wufan_im{
#pragma db object table("chat_session_member")   // table:指定表名称, 缺省类名
class ChatSessionMember{
public:
    ChatSessionMember(){}
    ChatSessionMember(const std::string& session_id, const std::string& user_id)
    :_session_id(session_id), _user_id(user_id)
    {}

    std::string user_id() { return _user_id; }
    void user_id(std::string val) { _user_id = val; }

    std::string session_id() { return _session_id; }
    std::string user_id(std::string val) { _session_id = val; }
private:
    friend class odb::access;
    #pragma db id auto
    unsigned long _id;
    #pragma db type("varchar(64)") index
    std::string _session_id;
    #pragma db type("varchar(64)")
    std::string _user_id;
};

}


